/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-09-30     FuLei       the first version
 */
#ifndef HARDWARE_SYSINFO_H_
#define HARDWARE_SYSINFO_H_

#include "at24cxx.h"

#define AT24CXX_ADDR (0xA0 >> 1)

typedef struct SystemInformation
{
    uint8_t  para1;
    uint8_t  para2;
    uint16_t para3;
    uint32_t para4;
}SysInfo_Struct;

extern at24cxx_device_t  dev_at24cxx;

 at24cxx_device_t at24cxx_init(const char *i2c_bus_name, uint8_t AddrInput);
 rt_err_t at24cxx_read(at24cxx_device_t dev, uint32_t ReadAddr, uint8_t *pBuffer, uint16_t NumToRead);
 rt_err_t at24cxx_write(at24cxx_device_t dev, uint32_t WriteAddr, uint8_t *pBuffer, uint16_t NumToWrite);

 void AT24Cxx_Init(void);
 void SystemInfo_Write(void);
 void SystemInfo_Read(void);


#endif /* HARDWARE_SYSINFO_H_ */
